<template>
  <div>
    <h1>Orderstate</h1>
    <!--搜索框-->
    <el-form :inline="true" ref="form" :model="queryLike" label-width="80px">
      <el-form-item label="通用搜索">
        <el-input v-model="queryLike.name" placeholder="输入要查找的字段"></el-input>
      </el-form-item>
      <el-form-item label="状态">
        <el-radio-group v-model="queryLike.state">
          <el-radio :label="1">正常</el-radio>
          <el-radio :label="0">封禁</el-radio>
          <el-radio :label="''">所有</el-radio>
        </el-radio-group>
      </el-form-item>
      <br>
      <el-form-item label="创建时间">
        <el-col :span="11">
          <el-date-picker type="date" placeholder="选择开始日期" v-model="queryLike.startTime1"
                          style="width: 100%;"></el-date-picker>
        </el-col>
        <el-col class="line" :span="2" style="text-align:center">-</el-col>
        <el-col :span="11">
          <el-time-picker placeholder="选择开始时间" v-model="queryLike.startTime2" style="width: 100%;"></el-time-picker>
        </el-col>
      </el-form-item>
      <el-form-item>
        <el-col :span="11">
          <el-date-picker type="date" placeholder="选择结束日期" v-model="queryLike.endTime1"
                          style="width: 100%;"></el-date-picker>
        </el-col>
        <el-col class="line" :span="2" style="text-align:center">-</el-col>
        <el-col :span="11">
          <el-time-picker placeholder="选择结束时间" v-model="queryLike.endTime2" style="width: 100%;"></el-time-picker>
        </el-col>
      </el-form-item>
      <br>
      <el-form-item label="排序类型">
        <el-radio-group v-model="queryLike.sortType">
          <el-radio :label="1">降序</el-radio>
          <el-radio :label="0">升序</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="排序依据">
        <el-radio-group v-model="queryLike.sortBy">
          <el-radio :label="10">创建时间</el-radio>
        </el-radio-group>
      </el-form-item>
      <br>
      <el-form-item label="页数">
        <el-input v-model="queryLike.page" width="20" placeholder="输入当前页"></el-input>
      </el-form-item>
      <el-form-item label="页内条数">
        <el-input v-model="queryLike.pageSize" width="20" placeholder="输入单页总条数"></el-input>
      </el-form-item>
      <el-form-item>
        <!--查询按钮-->
        <el-button type="primary" @click="search(queryLike)" icon="el-icon-search" value="查询"></el-button>
        <!--添加按钮-->
        <el-button style="float:right" type="success" icon="el-icon-circle-plus-outline" @click="insert()"
                   value="添加"></el-button>
      </el-form-item>
    </el-form>
    <!--添加填出的对话框(和修改是同一个)-->
    <el-dialog title="订单" :visible.sync="dialogFormVisible">
      <el-form :model="pojo">
        <el-form-item label="订单商品id" :label-width="formLabelWidth">
          <el-input v-model="pojo.sgid.sgid" autocomplete="on" disabled></el-input>
        </el-form-item>
        <el-form-item label="收货地址id" :label-width="formLabelWidth">
          <el-input v-model="pojo.sid.sid" autocomplete="on"></el-input>
        </el-form-item>
        <el-form-item label="顾客id" :label-width="formLabelWidth">
          <el-input v-model="pojo.cid.cid" autocomplete="on"></el-input>
        </el-form-item>
        <el-form-item label="发货地址id" :label-width="formLabelWidth">
          <!--地址选择的单选框-->
          <el-radio-group v-model="pojo.sfid.sid" v-for="item in addressList">
            <el-radio :label=item.sid>{{item.name}}-{{item.address}}</el-radio>
          </el-radio-group>
          <!--<el-input v-model="pojo.sfid.sid" autocomplete="on"></el-input>-->
        </el-form-item>
        <el-form-item label="优惠券id" :label-width="formLabelWidth">
          <el-input v-model="pojo.coupons" autocomplete="on"></el-input>
        </el-form-item>
        <el-form-item label="应付款" :label-width="formLabelWidth">
          <el-input v-model="pojo.payable" autocomplete="on"></el-input>
        </el-form-item>
        <el-form-item label="购买数量" :label-width="formLabelWidth">
          <el-input v-model="pojo.number" autocomplete="on"></el-input>
        </el-form-item>
        <el-divider>订单状态列表</el-divider>
        <!--添加按钮-->
        <el-button style="float:left" type="success" icon="el-icon-circle-plus" @click="saveOrderstate(pojo.gid)"
                   value="添加"></el-button>
        <br><br><br>
        <!--套餐-->
        <div v-for="item in pojo.list">
          <el-form :model="item">
            <el-form-item label="取消" :label-width="formLabelWidth2">
              <!--取消按钮-->
              <el-button style="float:right" type="error" icon="el-icon-remove" @click="deleteOrderstate(item)"
                         value="减少"></el-button>
            </el-form-item>
            <el-form-item label="状态码" :label-width="formLabelWidth2">
              <el-input v-model="item.state" autocomplete="on"></el-input>
            </el-form-item>
            <el-form-item label="创建时间" :label-width="formLabelWidth2">
              <el-input v-model="item.updatetime" autocomplete="on"></el-input>
            </el-form-item>
          </el-form>
        </div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="save(pojo)">确 定</el-button>
      </div>
    </el-dialog>
    <!--套餐对话框-->
    <el-dialog
      title="套餐"
      :visible.sync="packageDialogVisible"
      width="75%"
      center>
      <el-table :data="packageList.list" style="width: 100%" max-height="500px">
        <el-table-column fixed property="oid" label="主键"></el-table-column>
        <el-table-column property="updatetime" label="创建时间" width="150"></el-table-column>
        <el-table-column property="state" label="状态码"></el-table-column>
      </el-table>
    </el-dialog>
    <!--列表-->
    <el-table :data="user" style="width: 100%" max-height="600">
      <el-table-column fixed property="oid" label="主键"></el-table-column>
      <el-table-column property="goods.name" label="商品名称"></el-table-column>
      <el-table-column property="goods.picture.url" label="商品图片">
        <template slot-scope="scope">
          <el-image
            style="width: 100px; height: 100px"
            :src="baseURL+'data/picture/'+scope.row.goods.picture.url"
            :preview-src-list="[baseURL+'data/picture/'+scope.row.goods.picture.url]"
            fit='cover'
          >
          </el-image>
        </template>
      </el-table-column>
      <el-table-column property="goods.merchant.name" label="商家"></el-table-column>
      <el-table-column property="goods.card.name" label="标签"></el-table-column>
      <el-table-column property="state" label="状态码"></el-table-column>
      <el-table-column property="creattime" label="创建时间" width="150"></el-table-column>
      <el-table-column property="sgid.price" label="商品单价"></el-table-column>
      <el-table-column property="sgid.number" label="商品数量"></el-table-column>
      <el-table-column property="sgid.unit" label="商品单位"></el-table-column>
      <el-table-column property="cid.name" label="付款人"></el-table-column>
      <el-table-column property="coupons" label="优惠券id"></el-table-column>
      <el-table-column property="payable" label="实付金额"></el-table-column>
      <el-table-column property="number" label="购买数量"></el-table-column>
      <el-table-column property="sid.name" label="收货地点"></el-table-column>
      <el-table-column property="sid.address" label="收货地址(详细)"></el-table-column>
      <el-table-column property="sid.cname" label="收货人"></el-table-column>
      <el-table-column property="sfid.name" label="发货地点"></el-table-column>
      <el-table-column property="sfid.address" label="发货地址(详细)"></el-table-column>
      <el-table-column property="sfid.cname" label="发货人"></el-table-column>
      <el-table-column
        fixed="left"
        label="套餐">
        <template slot-scope="scope">
          <el-button type="text" @click="packageOn(scope.row)">点击查看订单状态</el-button>
        </template>
      </el-table-column>
      <el-table-column
        fixed="right"
        label="操作"
        width="200">
        <template slot-scope="scope">
          <el-button type="primary" icon="el-icon-setting" value="修改" @click="change(scope.row)" circle></el-button>
          <el-button v-if="scope.row.state===1" type="info" icon="el-icon-video-pause" value="封禁"
                     @click="enable(scope.row,scope.row.oid,0)" circle></el-button>
          <el-button v-if="scope.row.state!==1" type="info" icon="el-icon-video-play" value="启用"
                     @click="enable(scope.row,scope.row.oid,1)" circle></el-button>
          <el-button v-if="power===3" type="danger" icon="el-icon-delete" value="删除"
                     @click="phydele(scope.row,scope.row.oid)"
                     circle></el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: "Orderstate",
  props: {},
  data() {
    return {
      /**
       * @发货地址列表
       * */
      addressList:this.$store.state.List.Shippingaddress,
      /**
       * @套餐
       * */
      packageList: "",
      /**
       * @套餐展示
       * */
      packageDialogVisible: false,
      /***
       * @修改和添加数据类型
       * */
      pojo: this.$store.state.Pojo.OrderVo,
      /**
       * @弹出的对话框,用于修改和添加数据
       * */
      dialogFormVisible: false,
      /**
       * @对话框内条目的统一长度
       * */
      formLabelWidth: '120px',
      /**
       * @子对话框内条目统一长度
       * */
      formLabelWidth2: '100px',
      /**
       * @表单数据
       * */
      user: this.$store.state.List.OrderVo,
      /**
       * @权限,页面显示不同权限的操作
       * */
      power: this.$store.state.operator.power,
      /**
       * @查询条件
       * */
      queryLike: {
        OperatorId: "",
        startTime1: "2000-01-01 00:00:00.000+0000",
        startTime2: "2000-01-01 00:00:00.000+0000",
        endTime1: "2099-01-01 00:00:00.000+0000",
        endTime2: "2099-01-01 00:00:00.000+0000",
        name: "",
        page: 1,
        pageSize: 10,
        sortBy: 10,
        sortType: 1,
        state: 1,
        sgid: {
          "sgid": 0,
          "gid": 0,
          "price": 0.00,
          "number": 0,
          "unit": "",
          "creattime": "2021-12-25 19:55:58",
          "state": 0
        },
        goods: {
          "gid": 0,
          "name": "",
          "merchant": {
            "mid": 0,
            "name": "",
            "password": "",
            "telephone": 0,
            "pic": {
              "picid": "",
              "url": "",
              "creattime": "2021-12-25 19:55:58",
              "state": 0
            },
            "describe": {
              "iid": 0,
              "content": "",
              "creattime": "2021-12-25 19:55:58",
              "updatetime": "2021-12-25 19:55:58",
              "state": 0
            },
            "creattime": "2021-12-25 19:55:58",
            "state": 0
          },
          "card": {
            "caid": 0,
            "name": "",
            "creattime": "2021-12-25 19:55:58",
            "state": 0
          },
          "picture": {
            "picid": "",
            "url": "",
            "creattime": "2021-12-25 19:55:58",
            "state": 0
          },
          "describe": {
            "iid": 0,
            "content": "",
            "creattime": "2021-12-25 19:55:58",
            "updatetime": "2021-12-25 19:55:58",
            "state": 0
          },
          "number": 0,
          "activity": {
            "aid": 0,
            "type": 0,
            "name": "",
            "rule": {
              "rid": 0,
              "rule": "",
              "creattime": "2021-12-25 19:55:58",
              "state": 0
            },
            "creattime": "2021-12-25 19:55:58",
            "failtime": "2021-12-25 19:55:58",
            "state": 0
          },
          "creattime": "2021-12-25 19:55:58",
          "state": 0,
          "view": 0,
          "sale": 0,
          "list": [
            {
              "sgid": 0,
              "gid": 0,
              "price": 0.00,
              "number": 0,
              "unit": "",
              "creattime": "2021-12-25 19:55:58",
              "state": 0
            }
          ]
        },
        sid: {
          "sid": 0,
          "belongM": {
            "mid": 0,
            "name": "",
            "password": "",
            "telephone": 0,
            "pic": {
              "picid": "",
              "url": "",
              "creattime": "2021-12-25 19:55:58",
              "state": 0
            },
            "describe": {
              "iid": 0,
              "content": "",
              "creattime": "2021-12-25 19:55:58",
              "updatetime": "2021-12-25 19:55:58",
              "state": 0
            },
            "creattime": "2021-12-25 19:55:58",
            "state": 0
          },
          "belongC": {
            "cid": 0,
            "name": "",
            "password": "",
            "age": 0,
            "sex": 0,
            "telephone": 0,
            "vip": "",
            "pic": {
              "picid": "",
              "url": "",
              "creattime": "2021-12-25 19:55:58",
              "state": 0
            },
            "describe": {
              "iid": 0,
              "content": "",
              "creattime": "2021-12-25 19:55:58",
              "updatetime": "2021-12-25 19:55:58",
              "state": 0
            },
            "creattime": "2021-12-25 19:55:58",
            "state": 0
          },
          "name": "",
          "cname": "",
          "address": "",
          "sex": "",
          "telephone": 0,
          "creattime": "2021-12-25 19:55:58",
          "state": 0
        },
        cid: {
          "cid": 0,
          "name": "",
          "password": "",
          "age": 0,
          "sex": 0,
          "telephone": 0,
          "vip": "",
          "pic": {
            "picid": "",
            "url": "",
            "creattime": "2021-12-25 19:55:58",
            "state": 0
          },
          "describe": {
            "iid": 0,
            "content": "",
            "creattime": "2021-12-25 19:55:58",
            "updatetime": "2021-12-25 19:55:58",
            "state": 0
          },
          "creattime": "2021-12-25 19:55:58",
          "state": 0
        },
        sfid: {
          "sid": 0,
          "belongM": {
            "mid": 0,
            "name": "",
            "password": "",
            "telephone": 0,
            "pic": {
              "picid": "",
              "url": "",
              "creattime": "2021-12-25 19:55:58",
              "state": 0
            },
            "describe": {
              "iid": 0,
              "content": "",
              "creattime": "2021-12-25 19:55:58",
              "updatetime": "2021-12-25 19:55:58",
              "state": 0
            },
            "creattime": "2021-12-25 19:55:58",
            "state": 0
          },
          "belongC": {
            "cid": 0,
            "name": "",
            "password": "",
            "age": 0,
            "sex": 0,
            "telephone": 0,
            "vip": "",
            "pic": {
              "picid": "",
              "url": "",
              "creattime": "2021-12-25 19:55:58",
              "state": 0
            },
            "describe": {
              "iid": 0,
              "content": "",
              "creattime": "2021-12-25 19:55:58",
              "updatetime": "2021-12-25 19:55:58",
              "state": 0
            },
            "creattime": "2021-12-25 19:55:58",
            "state": 0
          },
          "name": "",
          "cname": "",
          "address": "",
          "sex": "",
          "telephone": 0,
          "creattime": "2021-12-25 19:55:58",
          "state": 0
        },
        coupons: 0,
        payable: 0.00,
        number: 0,
        list: [
          {
            "oid": 0,
            "state": 0,
            "updatetime": "2021-12-25 19:55:58"
          }
        ]
      },
      /**
       * @后端controller名字
       * */
      controller: 'OrderVo',
    };
  },
  computed: {
    baseURL() {
      return this.$store.state.baseURL;
    }
  },
  /**
   * @加载数据
   */
  created() {
    this.LoadMsg();
    this.LoadAddress();
  },
  /**
   * @static方法
   * */
  mounted() {
    (() => {
      /*console.log(this.$store.state.operator)
      this.power=this.$store.state.operator["power"];
      console.log(this.power);
      console.log(typeof (this.power))*/
    })();
  },
  methods: {
    /**
     * @判断为空
     * */
    isNull(val){
      if(val===''||val===null||val===undefined){
        return true;
      }
      return false;
    },
    /**
     * @加载发货地址列表
     * */
    LoadAddress(page,pageSize){
      let _this = this;
      if(this.isNull(page)){
        page=1;
      }
      if(this.isNull(pageSize)){
        pageSize=10;
      }
      this.axios.get(this.$store.state.baseURL + 'client/'+'Address'+'/queryLike?' + 'OperatorId=' + this.$store.state.operator.mid + '&state=' + 1
        +'&page='+page+'&pageSize='+pageSize)
        .then(res => {
          for (let i = 0; i < res.data.length; ++i) {
            res.data[i].creattime = _this.$helper.renderTime(res.data[i].creattime);
          }
          _this.addressList = res.data;
          //console.log(res.data);
        })
    },
    /**
     * @减少指定序列套餐
     * */
    deleteOrderstate2(val,list) {
      for (let i = 0; i < list.length; i++) {
        if (list[i] === val) {
          list.splice(i, 1);
          break;
        }
      }
    },
    /**
     * @减少套餐
     * */
    deleteOrderstate(val) {
      for (let i = 0; i < this.pojo.list.length; i++) {
        if (this.pojo.list[i] === val) {
          this.pojo.list.splice(i, 1);
          break;
        }
      }
    },
    /**
     * @增加套餐
     * */
    saveOrderstate(oid) {
      //console.log(gid)
      if (oid === "" || oid === null || oid === undefined) {
        oid = "";
      }
      let val = this.$helper.clone(this.$store.state.Pojo.OrderVo.list);
      val.oid = oid;
      val.state = "";
      val.updatetime = this.$helper.renderTime(new Date());
      this.pojo.list.push(val);
    },
    /**
     * @查询封装函数
     * */
    queryNoNameHaveState(val) {
      let _this = this;
      this.axios.post(this.$store.state.baseURL + 'client/' + this.controller + '/query?'
        + 'OperatorId=' + this.$store.state.operator.id,
        {
          "goods.merchant.mid":this.$store.state.operator.mid,
          "page": val.page,
          "pageSize": val.pageSize,
          "sortType": val.sortType,
          "sortBy": val.sortBy,
          "state": val.state,
          "startTime": (this.$helper.renderTime(val.startTime1).split(' ')[0] + ' ' + this.$helper.renderTime(val.startTime2).split(' ')[1]),
          "endTime": (this.$helper.renderTime(val.endTime1).split(' ')[0] + ' ' + this.$helper.renderTime(val.endTime2).split(' ')[1])
        })
        .then(res => {
          _this.$store.state.List.OrderVo = res.data;
          _this.LoadInfo(res.data);
          //console.log(_this.user);
        })
    },
    /**
     * @查询封装函数
     * */
    queryNoNameNoState(val) {
      let _this = this;
      this.axios.post(this.$store.state.baseURL + 'client/' + this.controller + '/query?'
        + 'OperatorId=' + this.$store.state.operator.id,
        {
          "goods.merchant.mid":this.$store.state.operator.mid,
          "page": val.page,
          "pageSize": val.pageSize,
          "sortType": val.sortType,
          "sortBy": val.sortBy,
          "startTime": (this.$helper.renderTime(val.startTime1).split(' ')[0] + ' ' + this.$helper.renderTime(val.startTime2).split(' ')[1]),
          "endTime": (this.$helper.renderTime(val.endTime1).split(' ')[0] + ' ' + this.$helper.renderTime(val.endTime2).split(' ')[1])
        })
        .then(res => {
          _this.$store.state.List.OrderVo = res.data;
          _this.LoadInfo(res.data);
          //console.log(_this.user);
        })
    },
    /**
     * @查询封装函数
     * */
    queryHaveNameHaveState(val) {
      let _this = this;
      this.axios.post(this.$store.state.baseURL + 'client/' + this.controller + '/query?'
        + 'OperatorId=' + this.$store.state.operator.id,
        {
          "goods.merchant.mid":this.$store.state.operator.mid,
          "goods.name": val.name,
          "goods.merchant.name": val.name,
          "goods.merchant.describe.content": val.name,
          "goods.card.name": val.name,
          "goods.describe.content": val.name,
          "goods.activity.name": val.name,
          "page": val.page,
          "pageSize": val.pageSize,
          "sortType": val.sortType,
          "sortBy": val.sortBy,
          "state": val.state,
          "startTime": (this.$helper.renderTime(val.startTime1).split(' ')[0] + ' ' + this.$helper.renderTime(val.startTime2).split(' ')[1]),
          "endTime": (this.$helper.renderTime(val.endTime1).split(' ')[0] + ' ' + this.$helper.renderTime(val.endTime2).split(' ')[1])
        })
        .then(res => {
          _this.$store.state.List.OrderVo = res.data;
          _this.LoadInfo(res.data);
          //console.log(_this.user);
        })
    },
    /**
     * @查询封装函数
     * */
    queryHaveNameNoState(val) {
      let _this = this;
      this.axios.post(this.$store.state.baseURL + 'client/' + this.controller + '/query?'
        + 'OperatorId=' + this.$store.state.operator.id,
        {
          "goods.merchant.mid":this.$store.state.operator.mid,
          "goods.name": val.name,
          "goods.merchant.name": val.name,
          "goods.merchant.describe.content": val.name,
          "goods.card.name": val.name,
          "goods.describe.content": val.name,
          "goods.activity.name": val.name,
          "page": val.page,
          "pageSize": val.pageSize,
          "sortType": val.sortType,
          "sortBy": val.sortBy,
          "startTime": (this.$helper.renderTime(val.startTime1).split(' ')[0] + ' ' + this.$helper.renderTime(val.startTime2).split(' ')[1]),
          "endTime": (this.$helper.renderTime(val.endTime1).split(' ')[0] + ' ' + this.$helper.renderTime(val.endTime2).split(' ')[1])
        })
        .then(res => {
          _this.$store.state.List.OrderVo = res.data;
          _this.LoadInfo(res.data);
          //console.log(_this.user);
        })
    },
    /**
     * @套餐嵌入内容
     * */
    packageOn(val) {
      this.packageDialogVisible = true;
      this.packageList = val;
    },
    /**
     * @添加
     * */
    insert() {
      this.pojo.oid="";
      this.pojo.sgid.sgid = "";
      this.pojo.sid.sid = "";
      this.pojo.cid.cid = "";
      this.pojo.sfid.sid = "";
      this.pojo.coupons = "";
      this.pojo.payable = "";
      this.pojo.number = "";
      this.pojo.creattime = "";
      this.pojo.state = 1;
      this.dialogFormVisible = true;
      let temp =[];
      for (let i = 0; i < this.pojo.list.length; i++) {
        this.pojo.list[i].oid = "";
        this.pojo.list[i].state = "";
        this.pojo.list[i].updatetime = this.$helper.renderTime(new Date());
        temp.push(this.pojo.list[0]);
        break;
      }
      this.pojo.list=temp;
    },
    /**
     * @修改
     * */
    change(val) {
      //console.log(val)
      this.pojo = this.$helper.clone(val);
      this.dialogFormVisible = true;
    },
    /**
     * @保存
     */
    save(val) {
      let _this = this;
      //this.dataPreprocessingT(val)
      //console.log(val)
      this.axios.post(this.$store.state.baseURL + 'client/' + this.controller + '/save?' + 'OperatorId=' + this.$store.state.operator.id,
        {
          "oid": val.oid,
          "sgid": val.sgid,
          "goods": val.goods,
          "sid": val.sid,
          "cid":val.cid,
          "sfid":val.sfid,
          "coupons": val.coupons,
          "payable": val.payable,
          "number": val.nu,
          "creattime": val.creattime,
          "state": val.state,
          "list":val.list
        })
        .then(res => {
          //console.log(res.data)
          _this.search(_this.queryLike);
        })
      this.dialogFormVisible = false;
    },
    /**
     * @物理删除
     */
    phydele(val, id) {
      let _this = this;
      //this.dataPreprocessingT(val);
      this.axios.post(this.$store.state.baseURL + 'client/' + this.controller + '/delete?' + 'OperatorId=' + this.$store.state.operator.id + '&id=' + id, {
        "oid": val.oid,
        "sgid": val.sgid,
        "goods": val.goods,
        "sid": val.sid,
        "cid":val.cid,
        "sfid":val.sfid,
        "coupons": val.coupons,
        "payable": val.payable,
        "number": val.nu,
        "creattime": val.creattime,
        "state": val.state,
        "list":val.list
      })
        .then(res => {
          _this.search(_this.queryLike);
        })
    },
    /**
     * @封禁-启用
     */
    enable(pojo,  id, type) {
      let _this = this;
      let val = this.$helper.clone(pojo);
      //this.dataPreprocessingT(val);
      this.axios.put(this.$store.state.baseURL + 'client/' + this.controller + '/enable?' + 'OperatorId=' + this.$store.state.operator.id + '&id=' + id + '&type=' + type, {
        "oid": val.oid,
        "sgid": val.sgid,
        "goods": val.goods,
        "sid": val.sid,
        "cid":val.cid,
        "sfid":val.sfid,
        "coupons": val.coupons,
        "payable": val.payable,
        "number": val.nu,
        "creattime": val.creattime,
        "state": type,
        "list":val.list
      })
        .then(res => {
          _this.search(_this.queryLike);
        })
    },
    /**
     * @查询
     * */
    search(val) {
      //console.log(val);
      if (val.name === "") {
        if (val.state === "") {
          this.queryNoNameNoState(val);
        } else {
          this.queryNoNameHaveState(val);
        }
      } else {
        if (val.state === "") {
          this.queryHaveNameNoState(val);
        } else {
          this.queryHaveNameHaveState(val);
        }
      }
    }
    ,
    /**
     *
     * @导入具体列表的数据
     */
    LoadMsg() {
      let _this = this;
      this.axios.post(this.$store.state.baseURL + 'client/' + this.controller + '/query?' + 'OperatorId=' + this.$store.state.operator.id,
        {
          "page": 1,
          "pageSize": 10,
          "sortType": 0,
          "sortBy": 10,
          "goods.merchant.mid":this.$store.state.operator.mid,
        })
        .then(res => {
          _this.$store.state.List.OrderVo = res.data;
          _this.LoadInfo(res.data);
          //console.log(res.data);
        })
    }
    ,
    /**
     *
     * @更新当前页面的数据(data<->this.$store.state)
     */
    LoadInfo(val) {
      this.user = val;
    }
    ,
  },
}
</script>

<style scoped>

</style>
